reftests: Add a reftest to check shorthands do work
authorBenjamin Otte <otte@redhat.com>
Sun, 22 May 2011 02:46:42 +0000 (04:46 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 22 May 2011 03:56:12 +0000 (05:56 +0200)
Checks shorthands are properly unpacked in the CSS and that they indeed
set all relevant properties. Or at least border-width does.

tests/reftests/Makefile.am
tests/reftests/shorthand-entry-border.css [new file with mode: 0644]
tests/reftests/shorthand-entry-border.ref.ui [new file with mode: 0644]
tests/reftests/shorthand-entry-border.ui [new file with mode: 0644]

index 106cbed990b10a76420cce1cfcc3ac11cbdd5087..b76907db64819ac5c23e183d57af8369f3b72521 100644 (file)
@@ -91,6 +91,9 @@ EXTRA_DIST += \
        quit-mnemonic.ui \
        rotated-layout.ref.ui \
        rotated-layout.ui \
+       shorthand-entry-border.css \
+       shorthand-entry-border.ref.ui \
+       shorthand-entry-border.ui \
        simple.ref.ui \
        simple.ui \
        toplevel-vs-popup.ref.ui \
diff --git a/tests/reftests/shorthand-entry-border.css b/tests/reftests/shorthand-entry-border.css
new file mode 100644 (file)
index 0000000..eca547b
--- /dev/null
@@ -0,0 +1,21 @@
+* {
+  engine: none;
+  border-radius: 0;
+}
+
+GtkWidget {
+  border-right-width: 5;
+}
+
+GtkEntry {
+  border-width: 10 20;
+}
+
+.entry {
+  border-left-width: 10;
+  border-right-width: 10;
+}
+
+#reference {
+  border-width: 10;
+}
diff --git a/tests/reftests/shorthand-entry-border.ref.ui b/tests/reftests/shorthand-entry-border.ref.ui
new file mode 100644 (file)
index 0000000..ea181fe
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkEntry" id="entry1">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="name">reference</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/shorthand-entry-border.ui b/tests/reftests/shorthand-entry-border.ui
new file mode 100644 (file)
index 0000000..91ce522
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkEntry" id="entry1">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+      </object>
+    </child>
+  </object>
+</interface>